home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1998 January / Pcwk0198.iso / Dzieci / SIMPDATA / SIMPMAIN / 00014_backgroundFXRecordManager parent.ls < prev    next >
Encoding:
Text File  |  1996-09-01  |  3.0 KB  |  93 lines

  1. property ancestor
  2. global frameLimit, theLayer, backgroundFXSpr, currentFrame, bgdFXData, theStageBounds, dirtyFlag
  3.  
  4. on birth me
  5.   set the ancestor of me to birth(script "recordMethods parent")
  6.   return me
  7. end
  8.  
  9. on record me
  10.   if count(bgdFXData) < currentFrame then
  11.     set previousBackgroundCast to getLast(bgdFXData)
  12.   else
  13.     set previousBackgroundCast to getAt(bgdFXData, currentFrame)
  14.   end if
  15.   set theLayer to backgroundFXSpr
  16.   buildFilterList(me)
  17.   set bgdFXName to getAt(curClipRecord, 2)
  18.   set loopList to getAt(curClipRecord, 5)
  19.   set firstClip to getAt(loopList, 1)
  20.   set the castNum of sprite backgroundFXSpr to firstClip
  21.   preLoadCast(getAt(loopList, 1), getLast(loopList))
  22.   cursor(-1)
  23.   set the loc of sprite backgroundFXSpr to point(313, 218)
  24.   updateStage()
  25.   repeat while the mouseUp
  26.     set theMouseLoc to point(the mouseH, the mouseV)
  27.     if inside(theMouseLoc, theStageBounds) then
  28.       set the castNum of sprite backgroundFXSpr to firstClip
  29.       set the loc of sprite backgroundFXSpr to point(313, 218)
  30.     else
  31.       if previousBackgroundCast <> [EMPTY, 0] then
  32.         set the castNum of sprite backgroundFXSpr to getAt(previousBackgroundCast, 2)
  33.         set the loc of sprite backgroundFXSpr to point(313, 218)
  34.       else
  35.         hideRecordingSpr(me, backgroundFXSpr)
  36.       end if
  37.     end if
  38.     updateStage()
  39.   end repeat
  40.   set theMouseH to the mouseH
  41.   set theMouseV to the mouseV
  42.   set theMouseLoc to point(theMouseH, theMouseV)
  43.   if inside(theMouseLoc, theStageBounds) then
  44.     set countBgdFXData to count(bgdFXData)
  45.     if countBgdFXData < currentFrame then
  46.       repeat with theFrameNumber = countBgdFXData + 1 to currentFrame
  47.         append(bgdFXData, [EMPTY, 0])
  48.       end repeat
  49.     end if
  50.     set overFlow to 0
  51.     repeat with theClipNumber = 1 to count(loopList)
  52.       if currentFrame < frameLimit then
  53.         if currentFrame > count(scoreData) then
  54.           setAt(scoreData, currentFrame, copyList(autoHoldFrame))
  55.         end if
  56.         set the loc of sprite backgroundFXSpr to point(313, 218)
  57.         set theClip to getAt(loopList, theClipNumber)
  58.         set the castNum of sprite backgroundFXSpr to theClip
  59.         set currentFrameData to list(bgdFXName, theClip)
  60.         setAt(bgdFXData, currentFrame, currentFrameData)
  61.         showFrame(playbackMgr, currentFrame, backgroundFXSpr)
  62.         setKrusty(playbackMgr)
  63.         incrementFrame()
  64.         next repeat
  65.       end if
  66.       set overFlow to 1
  67.       exit repeat
  68.     end repeat
  69.     if overFlow then
  70.       showOverFlowDialog(me)
  71.     end if
  72.     cursor(4)
  73.     extendClips(me)
  74.     if currentFrame > 1 then
  75.       decrementFrame()
  76.     end if
  77.     setKrusty(playbackMgr)
  78.     showFrame(playbackMgr, currentFrame, 0)
  79.     set dirtyFlag to 1
  80.     updateTheBrain(appMgr)
  81.     cursor(-1)
  82.   else
  83.     if previousBackgroundCast <> [EMPTY, 0] then
  84.       set the castNum of sprite backgroundFXSpr to getAt(previousBackgroundCast, 2)
  85.       set the loc of sprite backgroundFXSpr to point(313, 218)
  86.     else
  87.       hideRecordingSpr(me, backgroundFXSpr)
  88.     end if
  89.     showFrame(playbackMgr, currentFrame, 0)
  90.     cursor(-1)
  91.   end if
  92. end
  93.